package com.zmj.sy.mom.srv.aps.bean.vo.mbd.group;

import com.zmj.sy.mom.srv.aps.utils.Comment;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
public class MbdBalanceRateGetDataOfGroupResVo {

    @ApiModelProperty("留痕 ID")
    private Integer id;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("数量")
    private Integer orderQty;

    @ApiModelProperty("生产线平衡率配置")
    private BalanceRateData pro;

    @ApiModelProperty("自定义平衡率配置")
    private BalanceRateData customize;

    @Getter
    @Setter
    public static class BalanceRateData {

        @ApiModelProperty("平衡率")
        private BigDecimal balanceRate;

        @ApiModelProperty("平衡损失率")
        private BigDecimal equilibriumLossRate;

        @ApiModelProperty("瓶颈工序工时")
        private BigDecimal bottleneckProcess;

        @ApiModelProperty("瓶颈工序阶段， P1、P2、P3、P4、P5")
        private String bottleneckProcessStage;

        @ApiModelProperty("瓶颈工序名称")
        private String bottleneckProcessName;

        @ApiModelProperty("总工时")
        private BigDecimal totalWorkingHours;

        @ApiModelProperty("总工位数")
        private BigDecimal totalStationCount;

        @ApiModelProperty("生产线平衡指标")
        private List<PhaseData> phase = new ArrayList<>();

    }

    @Getter
    @Setter
    public static class PhaseData {

        @ApiModelProperty("工序名称")
        private String phaseName;

        @ApiModelProperty("工序代码")
        private String phaseCode;

        @ApiModelProperty("生产线平衡指标")
        private List<GroupData> groupDataList = new ArrayList<>();

    }


    @Getter
    @Setter
    public static class GroupData {

        @ApiModelProperty("是否不展示")
        private boolean hidden;

        @ApiModelProperty(value = "工作组编号")
        private String workGroupNumber;

        @ApiModelProperty(value = "工作组名称")
        private String workGroupName;

        @ApiModelProperty("实动工时（分钟）")
        private BigDecimal workTimeMinutes;

        @ApiModelProperty("制造能力")
        private BigDecimal workAbility;

        @ApiModelProperty("工位数量")
        private BigDecimal stationCount;

        @ApiModelProperty("工位数量 -- 设置值")
        private BigDecimal stationCountSetup;

        @ApiModelProperty("工位总数")
        private BigDecimal stationTotal;

        @ApiModelProperty("工序节拍")
        private BigDecimal processRhythm;

        @ApiModelProperty("调整策略")
        private String strategy;

        @ApiModelProperty(value = "物料名称")
        private String materName;

        @ApiModelProperty(value = "物料明细")
        private List<MaterialData> materials = new ArrayList<>();

    }

    @Getter
    @Setter
    public static class MaterialData {

        @ApiModelProperty(value = "订单 ID")
        private Integer orderId;

        @ApiModelProperty(value = "BOM ID")
        private Integer bomId;

        @ApiModelProperty(value = "工序 ID")
        private Integer phaseId;

        @ApiModelProperty(value = "父级PLMID")
        private String parentPlmid;

        @ApiModelProperty(value = "PLMID")
        private String plmid;

        @ApiModelProperty(value = "零件名称")
        private String materName;

        @ApiModelProperty(value = "零件数量")
        private String totalCount;

        @ApiModelProperty(value = "实动工时")
        private String workTime;

        @ApiModelProperty(value = "总工时")
        private String totalWorkTime;

        @Comment("材质")
        private String texture;

        @Comment("零件厚")
        private Integer materHigh;

        @Comment("零件长")
        private Integer materLength;

        @Comment("零件宽")
        private Integer materWidth;

        @Comment("单件重量")
        private BigDecimal materWeight;

        @Comment("工序链")
        private String workChain;

    }

}
